package cn.mulanbay.persistent.entity;

import cn.mulanbay.persistent.enums.UserType;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 *
 * @author fenghong
 * @create 2022-01-16 10:00
 */
@TableName("login_log")
public class LoginLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long userId;

    private String loginToken;

    private LocalDateTime loginTime;

    private String loginIp;

    private UserType loginType;

    private LocalDateTime createdTime;

    private LocalDateTime lastModifyTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public String getLoginToken() {
        return loginToken;
    }

    public void setLoginToken(String loginToken) {
        this.loginToken = loginToken;
    }
    public LocalDateTime getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(LocalDateTime loginTime) {
        this.loginTime = loginTime;
    }
    public String getLoginIp() {
        return loginIp;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }
    public UserType getLoginType() {
        return loginType;
    }

    public void setLoginType(UserType loginType) {
        this.loginType = loginType;
    }
    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }
    public LocalDateTime getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(LocalDateTime lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }

    @Override
    public String toString() {
        return "LoginLog{" +
            "id=" + id +
            ", userId=" + userId +
            ", loginToken=" + loginToken +
            ", loginTime=" + loginTime +
            ", loginIp=" + loginIp +
            ", loginType=" + loginType +
            ", createdTime=" + createdTime +
            ", lastModifyTime=" + lastModifyTime +
        "}";
    }
}
